﻿using System;
using System.Collections.Generic;
using System.Text;

namespace HenIT.BizTalk.Objects
{
    public class ReceiveLocation
    {
        public bool Match { get; set; }
        public string Name { get; set; }
        public BoolMatch IsPrimary { get; set; }
        public StringMatch ReceivePipeline { get; set; }
        public StringMatch ReceivePipelineData { get; set; }
        public StringMatch SendPipeline { get; set; }
        public StringMatch SendPipelineData { get; set; }

        public StringMatch TransportType { get; set; }
        public StringMatch TransportTypeData { get; set; }
        public StringMatch ReceiveHandlerHost { get; set; }

        public BoolMatch ServiceWindowEnabled { get; set; }
        public DateTimeMatch FromTime { get; set; }
        public DateTimeMatch ToTime { get; set; }

        public BoolMatch StartDateEnabled { get; set; }
        public DateTimeMatch StartDate { get; set; }
        public BoolMatch EndDateEnabled { get; set; }
        public DateTimeMatch EndDate { get; set; }

        public void MatchPropertiesWith(ReceiveLocation rl2)
        {
            IsPrimary.Value2 = rl2.IsPrimary.Value;
            ReceivePipeline.Name2 = rl2.ReceivePipeline.Name;
            ReceivePipelineData.Name2 = rl2.ReceivePipelineData.Name;
            SendPipeline.Name2 = rl2.SendPipeline.Name;
            SendPipelineData.Name2 = rl2.SendPipelineData.Name;
            TransportType.Name2 = rl2.TransportType.Name;
            ReceiveHandlerHost.Name2 = rl2.ReceiveHandlerHost.Name;
            ServiceWindowEnabled.Value2 = rl2.ServiceWindowEnabled.Value;
            FromTime.Value2 = rl2.FromTime.Value;
            ToTime.Value2 = rl2.ToTime.Value;
            StartDateEnabled.Value2 = rl2.StartDateEnabled.Value;
            StartDate.Value2 = rl2.StartDate.Value;
            EndDateEnabled.Value2 = rl2.EndDateEnabled.Value;
            EndDate.Value2 = rl2.EndDate.Value;
        }
    }
}
